
#循环输出1-9的值
for i in range(1,10):
    print(i,end=" ")

print()
print("="*40)


#循环输出9行1-9的值
for j in range(1,10):
    for i in range(1,10):
        print(i,end=" ")
    print()

print()
print("="*40)


#循环输出9行1-9的值(三角型)
for j in range(1,10):
    for i in range(1,j+1):
        print(i,end=" ")
    print()

print()
print("="*40)


#循环输出九九乘法表
for j in range(1,10):
    for i in range(1,j+1):
        print("{}X{}={:<3}".format(i,j,j*i),end="")
    print()

print()
print("="*60)

#循环输出九九乘法表
for j in range(9,0,-1):
    for i in range(1,j+1):
        print("{}X{}={:<3}".format(i,j,j*i),end="")
    print()

print()
print("="*60)

#循环输出九九乘法表
#循环九行
for j in range(1,10):
    #输出九个值
    for i in range(9,0,-1):
        if i>j:
            print(" "*7,end="")
        else:
            print("{}X{}={:<3}".format(i,j,j*i),end="")
    print()

print()
print("="*60)


#循环输出九九乘法表
#循环九行
for j in range(9,0,-1):
    #输出九个值
    for i in range(9,0,-1):
        if i>j:
            print(" "*7,end="")
        else:
            print("{}X{}={:<3}".format(i,j,j*i),end="")
    print()

print()
print("="*60)



#循环输出九九乘法表
#循环九行
j = 9
while j>0:
    #输出九个值
    i=9
    while i>0:
        if i>j:
            print(" "*7,end="")
        else:
            print("{}X{}={:<3}".format(i,j,j*i),end="")
        i -= 1
    j -= 1
    print()

print()
print("="*60)